﻿@model handvn.Models.Product
@{
    ViewBag.Title = "Delete";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}
@if (Request.IsAuthenticated && @Session["LoaiTaiKhoan"]!=null)
{
    if (@Session["LoaiTaiKhoan"].ToString() == "admin" || @Session["LoaiTaiKhoan"].ToString() == "mod")
    {
    <h1>
        Quản lý sản phẩm</h1>
    <h2>
        Delete</h2>

    <h3>
        Are you sure you want to delete this?</h3>
    <fieldset>
        <legend>Product</legend>
        <div class="display-label">
            TenSanPham</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.TenSanPham)
        </div>
        <div class="display-label">
            GiaSanPham</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.GiaSanPham)
        </div>
        <div class="display-label">
            GiaThiTruong</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.GiaThiTruong)
        </div>
        <div class="display-label">
            HinhAnh</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.HinhAnh)
        </div>
        <div class="display-label">
            GioiThieu</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.GioiThieu)
        </div>
        <div class="display-label">
            SoLuong</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.SoLuong)
        </div>
        <div class="display-label">
            SoLuotXem</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.SoLuotXem)
        </div>
        <div class="display-label">
            NgayNhapSanPham</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.NgayNhapSanPham)
        </div>
        <div class="display-label">
            DetailCategories</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.DetailCategories.TenChiTietDanhMuc)
        </div>
        <div class="display-label">
            User</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.User.Username)
        </div>
        <div class="display-label">
            TinhTrang</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.TinhTrang)
        </div>
    </fieldset>
        using (Html.BeginForm())
        {
    <p>
        <input type="submit" value="Delete" />
        |
        @Html.ActionLink("Back to List", "Index")
    </p>
        }
    }
}
else
{
    <p>
        Xin vui lòng đăng nhập</p>
    <script type="text/javascript">
        window.location.href = "http://handvn.com/Account/Admin"
    </script>
}